package com.surprise.common.bean;

/**
 * 通用结果返回
 * @author zhangceven
 *
 */
public class Result {

	private Integer code; // 返回状态码
	
	private String msg; // 返回消息
	
	private Object data; // 返回数据

	public Result() {

	}

	public Result(Integer code, String msg, Object data) {
		this.code = code;
		this.msg = msg;
		this.data = data;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}
	
	public void setSuccess(Integer code, String msg, Object data) {
		this.code = code;
		this.msg = msg;
		this.data = data;
	}
	
	public void setFailure(Integer code, String msg) {
		this.code = code;
		this.msg = msg;
	}
}
